#include<stdio.h>
int f(int n);
int main(void)
{
	int m,s;	
	printf("Input a positive integer:\n");
	scanf("%d",&m);
	s=f(m);
	printf("%d\n",s);	
	return 0;
}
int f(int n)
{
	int r;
	if (n>1)
		r=n+f(n -1);
	else
		r=1;
	return r;
}